home *** CD-ROM | disk | FTP | other *** search
/ Cyberstrip Blackjack / Cyberstrip Blackjack.iso / pc / black18.dir / 00001_Script_1 next >
Text File  |  1995-08-14  |  13KB  |  527 lines

  1. on startmovie
  2.   puppetsprite 15, true
  3.   set the locH of sprite 15 to 90
  4.   set the locV of sprite 15 to 45
  5.   set the castnum of sprite 15 to 248
  6.   puppetsprite 16, true
  7.   set the locH of sprite 16 to 40
  8.   set the locV of sprite 16 to 45  
  9.   set the castnum of sprite 16 to 248
  10.   puppetsprite 17, true
  11.   set the locH of sprite 17 to 140
  12.   set the locV of sprite 17 to 45
  13.   set the castnum of sprite 17 to 248
  14.   puppetsprite 18, true
  15.   set the locH of sprite 18 to 190
  16.   set the locV of sprite 18 to 45
  17.   set the castnum of sprite 18 to 248
  18.   puppetsprite 19, true
  19.   set the locH of sprite 19 to 240
  20.   set the locV of sprite 19 to 45
  21.   set the castnum of sprite 19 to 248
  22.   puppetsprite 20, true 
  23.   set the locH of sprite 20 to 381
  24.   set the locV of sprite 20 to 382
  25.   set the castnum of sprite 20 to 248
  26.   puppetsprite 21, true
  27.   set the locH of sprite 21 to 431
  28.   set the locV of sprite 21 to 382
  29.   set the castnum of sprite 21 to 248
  30.   puppetsprite 22, true
  31.   set the locH of sprite 22 to 481
  32.   set the locV of sprite 22 to 382
  33.   set the castnum of sprite 22 to 248
  34.   puppetsprite 23, true
  35.   set the locH of sprite 23 to 531
  36.   set the locV of sprite 23 to 382
  37.   set the castnum of sprite 23 to 248
  38.   puppetsprite 24, true
  39.   set the locH of sprite 24 to 581
  40.   set the locV of sprite 24 to 382
  41.   set the castnum of sprite 24 to 248 
  42.   
  43.   global ybank,dbank,pot,hardamount
  44.   set hardamount = 1000
  45.   set pot=10
  46.   set ybank=HardAmount
  47.   set dbank=HardAmount
  48. end startmovie
  49.  
  50. ON UNPUPBUTS
  51.   REPEAT WITH I= 15 TO 24
  52.     SET THE VISIBILITY OF SPRITE I TO FALSE
  53.   END REPEAT
  54. END UNPUPBUTS
  55.  
  56. ON PUPBUTS
  57.   REPEAT WITH I= 15 TO 24
  58.     SET THE VISIBILITY OF SPRITE I TO TRUE
  59.   END REPEAT
  60. END PUPBUTS
  61.  
  62. on M13inch
  63.   global size
  64.   set size=true
  65.   set the text of cast B24 to "PLACE BET AT LEFT AND HIT OK"
  66.   set the text of cast B28 to "INSURE YOURSELF OR HIT OK"
  67.   set the text of cast B25 to "SELECT AN OPTION AT LEFT"
  68.   set the locV of sprite 20 to 382
  69.   set the locV of sprite 21 to 382
  70.   set the locV of sprite 22 to 382
  71.   set the locV of sprite 23 to 382
  72.   set the locV of sprite 24 to 382 
  73. end M13inch
  74.  
  75. on M12inch
  76.   NOTHING
  77. end M12inch
  78.  
  79. on newgame2 amt
  80.   global HardAmount
  81.   set hardamount=amt
  82.   go "Restarter"
  83. end newgame2
  84.  
  85. on init
  86.   M13inch
  87.   ablemenu ("options",false)
  88.   ablemenu ("bet", false)
  89.   ablemenu ("Insure",false)
  90.   global NumCards, CardNum, Card, ybank,dbank,pot, insured, size , hardamount
  91.   set pot=10
  92.   set ybank=HardAmount
  93.   set dbank=HardAmount
  94.   set insured=0
  95.   set the text of cast "banks" = "$"&dbank&return&return&return&"$"&pot&return&return&return&"$"&ybank
  96.   if size=false then set the text of cast "Info" = "BET:"&return&"$"&POT& ¼
  97. return&return&"BANK:"&return&"$"&ybank 
  98.   put 156 into numcards
  99.   put 0 into cardnum
  100.   put Array(mnew) into Card
  101.   repeat while cardnum<numcards
  102.     card(mPut, cardnum, (cardnum mod 52)) 
  103.     set cardnum=cardnum+1
  104.   end repeat
  105.   
  106.   
  107.   global tencards, cardVal
  108.   put 0 into tencards
  109.   put array2(mnew) into cardVal
  110.   repeat while tencards<10
  111.     cardval(mput, tencards, 0)
  112.     set tencards=tencards+1
  113.   end repeat
  114. end init
  115.  
  116. on shuffle
  117.   global Numcards, Cardnum, Card
  118.   set cardnum=0
  119.   set temp1 = 0
  120.   set temp2 = 0
  121.   repeat while (cardnum<(numcards*4))
  122.     set tempnum1 = ((random(numcards))-1)
  123.     set tempnum2 = ((random(numcards))-1)
  124.     set temp1=card(mget,tempnum1)
  125.     set temp2=card(mget,tempnum2)
  126.     card(mput,tempnum1,temp2)
  127.     card(mput,tempnum2,temp1)
  128.     set cardnum=cardnum+1
  129.   end repeat
  130.   set cardnum=0 
  131. end shuffle
  132.  
  133. factory Array
  134.   -- 
  135. end Array
  136.  
  137. factory Array2
  138.   --
  139. end Array2
  140.  
  141. on getcard slot, val
  142.   global card, cardnum, numcards, cardval, dfirstcard
  143.   set the castnum of sprite slot to (193+card(mget, cardnum))
  144.   
  145.   if slot =15 then
  146.     set dfirstcard = (193+card(mget,cardnum))
  147.     set the castnum of sprite 15 to 245
  148.   end if
  149.   
  150.   set temp=0
  151.   set temp= (card(mget,cardnum) mod 13)
  152.   set temp=temp+2
  153.   if (temp=11 or temp=12 or temp=13) then set temp=10
  154.   if temp=14 then set temp=11
  155.   cardval(mput, val, temp)
  156.   
  157.   set cardnum=cardnum +1  
  158.   if cardnum = numcards then play "shuffle"
  159. end getcard
  160.  
  161. on newgame
  162.   global tencards, cardVal,dfirstcard, insured
  163.   set insured=0
  164.   set dfirstcard=245
  165.   put 0 into tencards
  166.   repeat while tencards<10
  167.     cardval(mput, tencards, 0)
  168.     set tencards=tencards+1
  169.   end repeat
  170.   set the castnum of sprite 15 to 248
  171.   set the castnum of sprite 16 to 248
  172.   set the castnum of sprite 17 to 248 
  173.   set the castnum of sprite 18 to 248
  174.   set the castnum of sprite 19 to 248
  175.   set the castnum of sprite 20 to 248
  176.   set the castnum of sprite 21 to 248
  177.   set the castnum of sprite 22 to 248
  178.   set the castnum of sprite 23 to 248
  179.   set the castnum of sprite 24 to 248 
  180. end newgame
  181.  
  182. on betdeductions
  183.   global ybank,dbank,pot,size
  184.   set ybank=ybank-pot
  185.   set the text of cast "banks" = "$"&dbank&return&return&return&"$"&pot&return&return&return&"$"&ybank
  186.   if size=false then set the text of cast "Info" = "BET:"&return&"$"&POT& ¼
  187. return&return&"BANK:"&return&"$"&ybank 
  188. end betdeductions
  189.  
  190. on hit1
  191.   global ytotal
  192.   getcard (22,2)
  193.   ycountcards
  194.   if ytotal =21 then
  195.     go "end"
  196.     exit  
  197.   end if
  198.   if ytotal=0 then
  199.     go "Dwin"
  200.     exit
  201.   end if
  202.   go "round2"
  203. end hit1
  204.  
  205. on hit2
  206.   global ytotal
  207.   getcard (23,3)
  208.   ycountcards
  209.   if ytotal =21 then
  210.     go "end"
  211.     exit  
  212.   end if
  213.   if ytotal=0 then
  214.     go "Dwin"
  215.     exit
  216.   end if
  217.   go "round3"
  218. end hit2
  219.  
  220. on hit3
  221.   global ytotal
  222.   getcard (24,4)
  223.   ycountcards
  224.   if ytotal =21 then
  225.     go "end"
  226.     exit  
  227.   end if
  228.   if ytotal=0 then
  229.     go "Dwin"
  230.     exit
  231.   end if
  232.   go "Lhit"
  233. end hit3
  234.  
  235. on DD
  236.   global ytotal
  237.   getcard (24,4)
  238.   ycountcards
  239.   if ytotal =21 then
  240.     go "end"
  241.     exit  
  242.   end if
  243.   if ytotal=0 then
  244.     go "Dwin"
  245.     exit
  246.   end if
  247. end DD
  248.  
  249. on ycountcards
  250.   global cardval,ytotal, ybank,dbank,pot,size,extra
  251.   set ytotal=0
  252.   set temp1=cardval(mget,0)
  253.   set temp2=cardval(mget,1) 
  254.   set temp3=cardval(mget,2)
  255.   set temp4=cardval(mget,3) 
  256.   set temp5=cardval(mget,4)
  257.   
  258.   set extra = 0
  259.   --equal 21
  260.   if temp1+temp2=21 then
  261.     set ytotal=21
  262.     set the text of cast "yresult" to "You Drew A Natural Blackjack!!!"
  263.     set the text of cast "dresult" to "I Pay You 1.5 to 1"
  264.     set extra=(pot/2)
  265.     set the text of cast "banks" = "$"&dbank&return&return&return&"$"&pot&return&return&return&"$"&ybank
  266.     if size=false then set the text of cast "Info" = "BET:"&return&"$"&POT& ¼
  267. return&return&"BANK:"&return&"$"&ybank 
  268.     go "Ywin"
  269.     exit
  270.   end if
  271.   if temp1+temp2+temp3+temp4+temp5=21 then
  272.     set ytotal=21
  273.     set the text of cast "yresult" to "You Got 21"
  274.     go "end"
  275.     exit
  276.   end if
  277.   
  278.   --over 21
  279.   if temp1+temp2+temp3+temp4+temp5>21 then 
  280.     --if Ace
  281.     if temp1=11 then 
  282.       cardval(mput,0,1)
  283.       ycountcards
  284.       exit 
  285.     end if
  286.     if temp2=11 then 
  287.       cardval(mput,1,1)
  288.       ycountcards
  289.       exit 
  290.     end if
  291.     if temp3=11 then 
  292.       cardval(mput,2,1)
  293.       ycountcards
  294.       exit 
  295.     end if
  296.     if temp4=11 then 
  297.       cardval(mput,3,1)
  298.       ycountcards
  299.       exit 
  300.     end if
  301.     if temp5=11 then 
  302.       cardval(mput,4,1)
  303.       ycountcards
  304.       exit 
  305.     end if
  306.     --bust
  307.     set ytotal=0
  308.     set the text of cast "Yresult" to "You Busted"
  309.     set the text of cast "Dresult" to "I Win By Default"
  310.     exit   
  311.   end if
  312.   
  313.   --under 21
  314.   set ytotal =Temp1+temp2+temp3+temp4+temp5
  315.   set the text of cast "yresult" to "You have "&ytotal 
  316.   
  317. end ycountcards
  318.  
  319. on dcountcards
  320.   global cardval,dtotal,ytotal
  321.   set dtotal=0
  322.   set temp1=cardval(mget,5)
  323.   set temp2=cardval(mget,6) 
  324.   set temp3=cardval(mget,7)
  325.   set temp4=cardval(mget,8) 
  326.   set temp5=cardval(mget,9)
  327.   
  328.   --equal 21
  329.   if temp1+temp2=21 then
  330.     set dtotal=21
  331.     set the text of cast "Dresult" to "I Drew Natural Blackjack"
  332.     go "after"
  333.     exit
  334.   end if
  335.   if temp1+temp2+temp3+temp4+temp5=21 then
  336.     set dtotal=21
  337.     set the text of cast "Dresult" to "I Got 21"
  338.     go "after"
  339.     exit
  340.   end if
  341.   
  342.   --over 21
  343.   if temp1+temp2+temp3+temp4+temp5>21 then 
  344.     --if Ace
  345.     if temp1=11 then 
  346.       cardval(mput,5,1)
  347.       ycountcards
  348.       exit 
  349.     end if
  350.     if temp2=11 then 
  351.       cardval(mput,6,1)
  352.       ycountcards
  353.       exit 
  354.     end if
  355.     if temp3=11 then 
  356.       cardval(mput,7,1)
  357.       ycountcards
  358.       exit 
  359.     end if
  360.     if temp4=11 then 
  361.       cardval(mput,8,1)
  362.       ycountcards
  363.       exit 
  364.     end if
  365.     if temp5=11 then 
  366.       cardval(mput,9,1)
  367.       ycountcards
  368.       exit 
  369.     end if
  370.     --bust 
  371.     set dtotal=0
  372.     set the text of cast "Dresult" to "I Busted"
  373.     set the text of cast "Yresult" to "You Winà"  
  374.     go "Ywin"
  375.     exit
  376.   end if
  377.   
  378.   --under 21
  379.   set dtotal =temp1+temp2+temp3+temp4+temp5
  380.   set the text of cast "Dresult" to "I have "&Dtotal
  381.   if dtotal>16 then
  382.     go "After"
  383.     exit
  384.   end if
  385. end dcountcards
  386.  
  387. on Ymoney
  388.   global ybank,dbank,pot,size,extra
  389.   set dbank=dbank-pot
  390.   set ybank=ybank+(2*pot)
  391.   set ybank=ybank+extra
  392.   set dbank=dbank-extra
  393.   set pot=10
  394.   set the text of cast "banks" = "$"&dbank&return&return&return&"$"&pot&return&return&return&"$"&ybank
  395.   if size=false then set the text of cast "Info" = "BET:"&return&"$"&POT& ¼
  396. return&return&"BANK:"&return&"$"&ybank 
  397. end Ymoney
  398.  
  399. on YTie
  400.   global ybank,dbank,pot,size
  401.   set ybank=ybank+pot
  402.   set pot=10
  403.   set the text of cast "banks" = "$"&dbank&return&return&return&"$"&pot&return&return&return&"$"&ybank
  404.   if size=false then set the text of cast "Info" = "BET:"&return&"$"&POT& ¼
  405. return&return&"BANK:"&return&"$"&ybank 
  406. end YTie
  407.  
  408. on dmoney
  409.   global ybank,dbank,pot,insured,size
  410.   set dbank=dbank+pot
  411.   set pot=10
  412.   set the text of cast "banks" = "$"&dbank&return&return&return&"$"&pot&return&return&return&"$"&ybank
  413.   if size=false then set the text of cast "Info" = "BET:"&return&"$"&POT& ¼
  414. return&return&"BANK:"&return&"$"&ybank 
  415. end dmoney
  416.  
  417. on checkwinner
  418.   global ytotal,dtotal
  419.   if ytotal>dtotal then 
  420.     go "ywin"
  421.     exit
  422.   end if
  423.   if dtotal>ytotal then 
  424.     go "dwin"
  425.     exit
  426.   end if
  427.   go "tie"
  428.   exit
  429. end checkwinner
  430.  
  431. on doubledown
  432.   global ybank,dbank,pot,size
  433.   set ybank=ybank-pot
  434.   set pot=pot+pot
  435.   set the text of cast "banks" = "$"&dbank&return&return&return&"$"&pot&return&return&return&"$"&ybank
  436.   if size=false then set the text of cast "Info" = "BET:"&return&"$"&POT& ¼
  437. return&return&"BANK:"&return&"$"&ybank 
  438. end doubledown
  439.  
  440. on InsureMe
  441.   ablemenu ("insure",false)
  442.   global insured, ybank,dbank,pot,size
  443.   set ybank=ybank-(pot/2)
  444.   set dbank=dbank+(pot/2)
  445.   set insured = 1
  446.   set the text of cast "banks" = "$"&dbank&return&return&return&"$"&pot&return&return&return&"$"&ybank
  447.   if size=false then set the text of cast "Info" = "BET:"&return&"$"&POT& ¼
  448. return&return&"BANK:"&return&"$"&ybank 
  449.   go "round1"
  450. end InsureMe
  451.  
  452. on insureMeNot
  453.   ablemenu ("insure",false)
  454.   go "round1"
  455. end insureMeNot
  456.  
  457. on FaerieOn
  458.   puppetsprite 4, true
  459.   global cardval,cardnum,card
  460.   set temp=0
  461.   set temp= (card(mget,cardnum) mod 13)
  462.   set temp=temp+2
  463.   if (temp=11 or temp=12 or temp=13) then set temp=10
  464.   if temp=14 then set temp=1
  465.   If cardval(mget,0)+cardval(mget,1)+cardval(mget,2)+cardval(mget,3)+cardval(mget,4)+temp>21 then
  466.     set the castNum of sprite 4 to the number of cast "Stay"
  467.     exit
  468.   end if
  469.   set the castNum of sprite 4 to the number of cast "Hit" 
  470. end FaerieOn
  471.  
  472. on bossStart
  473.   when timeout then Nothing
  474.   sound stop 1
  475.   sound stop 2
  476. end bossStart
  477.  
  478. on bossOver
  479.   nothing
  480. end bossOver
  481.  
  482. on stopmovie
  483.   puppetsprite 7, false 
  484.   puppetsprite 15, false
  485.   puppetsprite 16, false 
  486.   puppetsprite 17, false 
  487.   puppetsprite 18, false  
  488.   puppetsprite 19, false
  489.   puppetsprite 20, false
  490.   puppetsprite 21, false 
  491.   puppetsprite 22, false 
  492.   puppetsprite 23, false  
  493.   puppetsprite 24, false
  494. end stopmovie
  495.  
  496. on bet amount
  497.   global pot,ybank
  498.   set pot=amount
  499.   set the text of cast "Info" = "BET:"&return&"$"&POT&return&return&"BANK:"&return&"$"&ybank 
  500.   go "Postbet"
  501. end bet
  502.  
  503. on Hitter
  504.   ablemenu ("options",false)
  505.   if the frame < 37 then
  506.     hit1
  507.     exit
  508.   end if
  509.   if the frame > 41 then
  510.     hit3
  511.     exit
  512.   end if
  513.   if the frame >37 and the frame <41 then 
  514.     hit2 
  515.     exit
  516.   end if   
  517. end hitter 
  518.  
  519. on ablemenu themenu, flag
  520.   NOTHING
  521. end ablemenu
  522.  
  523.  
  524.  
  525.  
  526.  
  527.